d/rules: Generate files from .in counterparts for every package
authorSimon McVittie <smcv@debian.org>
Sun, 30 Sep 2018 16:50:37 +0000 (17:50 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 30 Sep 2018 16:50:40 +0000 (17:50 +0100)
Doing this for every package, not just the ones we are going to build,
avoids dh_missing false positives for files that would have gone into
packages not included in the current build, for example libgtk-4-common
during an amd64-only build.

debian/changelog
debian/rules

index 98006d9d914d3d49bd6314d85e85b6bfda6eb046..45e8b3b7c0a8ae588cbbace0d54d51d06e33c191 100644 (file)
@@ -63,6 +63,11 @@ gtk+4.0 (3.94.0-1) UNRELEASED; urgency=medium
   * d/missing-sources: Remove, no longer needed
   * Fix generation of README.md.gz symlinks
   * d/gbp.conf: Import configuration from glib2.0
+  * d/rules: Generate files from .in counterparts for every package,
+    not just the ones we are going to build. This avoids dh_missing
+    false positives for files that would have gone into packages not
+    included in the current build, for example libgtk-4-common during
+    an amd64-only build.
 
  -- Jeremy Bicha <jbicha@debian.org>  Fri, 19 Jan 2018 22:05:35 -0500
 
index 50bda632dceadd5434983e0094ab9e92ee5bbfe9..b887b1e958c2b3b47e0ab301901b8393e2f76781 100755 (executable)
@@ -6,7 +6,8 @@ include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
 include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
 include /usr/share/dpkg/default.mk
 
-binaries := $(shell dh_listpackages)
+built_binaries := $(shell dh_listpackages)
+all_binaries := $(shell sed -ne 's/^Package: *//p' < debian/control)
 
 # Ensure the build aborts when there are still references to undefined symbols
 # currently fails at least in the im-multipress im module
@@ -134,13 +135,13 @@ configure_flags_udeb = \
 override_dh_clean: debian/control
        # gross kludge to force control generation with the %.in target
        touch debian/control.in
-       rm -f $(call dh_subst_files,$(binaries))
+       rm -f $(call dh_subst_files,$(all_binaries))
        rm -f testsuite/reftests/*.ui.known_fail
        rm -rf debian/build debian/install
        dh_clean
 
 # Add dependencies to generate files from the debian/*.in ones
-override_dh_auto_build: $(call dh_subst_files,$(binaries))
+override_dh_auto_build: $(call dh_subst_files,$(all_binaries))
 
 override_dh_auto_configure: debian/control
        dh_auto_configure \
@@ -149,7 +150,7 @@ override_dh_auto_configure: debian/control
                $(configure_flags_common) \
                $(configure_flags_deb) \
                $(NULL)
-ifneq ($(filter %-udeb,$(binaries)),)
+ifneq ($(filter %-udeb,$(built_binaries)),)
        dh_auto_configure \
                --builddirectory=debian/build/udeb \
                -- \
@@ -160,7 +161,7 @@ endif
 
 override_dh_auto_build:
        dh_auto_build --builddirectory=debian/build/deb
-ifneq ($(filter %-udeb,$(binaries)),)
+ifneq ($(filter %-udeb,$(built_binaries)),)
        dh_auto_build --builddirectory=debian/build/udeb
 endif
 
@@ -183,7 +184,7 @@ endif
 
 override_dh_auto_install:
        dh_auto_install --builddirectory=debian/build/deb --destdir=debian/install/deb
-ifneq ($(filter %-udeb,$(binaries)),)
+ifneq ($(filter %-udeb,$(built_binaries)),)
        dh_auto_install --builddirectory=debian/build/udeb --destdir=debian/install/udeb
 endif